const express = require('express')
const app = express()
const login = require('./routers/login');

app.use(express.json());
app.use(express.urlencoded({ extended: true }));

app.all('*', function (req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "*");
  res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS");
  res.header("X-Powered-By", ' 3.2.1')
  res.header("Content-Type", "application/json;charset=utf-8");
  next();
});

app.use('/api/login', login);

app.listen(3000)
console.log('Listening at http://localhost:3000' + '\n')
